package com.cn.lp.export.server.base.context;

import com.cn.lp.export.server.base.result.ResultCode;

/**
 * 导出异常
 * Created by qirong on 2020/10/18.
 */
public class ExportException extends RuntimeException {

    /**
     * 结果码
     */
    private int code;

    public ExportException(ResultCode resultCode) {
        super(resultCode.getMessage());
        this.code = resultCode.getCode();
    }

    public ExportException(int code, String msg) {
        super(msg);
        this.code = code;
    }

    public ExportException(int code, String msg, Throwable cause) {
        super(msg, cause);
        this.code = code;
    }

    public int getCode() {
        return code;
    }
}
